﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace ECONTACT.DataLayer
{
    public class PhanLopData
    {
        DataService m_PhanLopData = new DataService();

        public DataTable LayDsPhanLop()
        {
            SqlCommand cmd = new SqlCommand("SELECT * FROM PHANLOP");
            m_PhanLopData.Load(cmd);
            return m_PhanLopData;
        }


        public void LuuPhanLop(String MaLop,String MaHS)
        {
            SqlCommand cmd = new SqlCommand("sp_PhanLop");

            cmd.Parameters.Add("@MaLop", SqlDbType.NVarChar).Value = MaLop;
            cmd.Parameters.Add("@MaHS", SqlDbType.NVarChar).Value = MaHS;

            m_PhanLopData.LoadProc(cmd);
        }
    }
}
